package com.zzb.weikeautosign.param;

import com.zzb.weikeautosign.SecurityUtils;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.log4j.Logger;

/**
 * Created by 瑱彬 on 2016/1/15.
 *
 */
/*
sign	    09af4f47fd1a64c0c43384d1f9a418f5
timestamp	1452851272433
netType 	1
osVersion	4.2.2
appVersion	5.1
deviceModel	MI
device	    1
userName	13750504476
auth	743071e9de71ba50675564774044dda5
 */
public class LoginParam extends BaseParam{
    private static final Logger log = Logger.getLogger(LoginParam.class);

    private String netType="1";
    private String osVersion="4.2.2";
    private String userName;
    private String auth;

    public LoginParam(String userName,String password){
        this.userName = userName;
        auth = DigestUtils.md5Hex(userName+password+"HHOO");
        sign = SecurityUtils.getHttpParamsSecuryKey(toMap());
    }

    public String getNetType() {
        return netType;
    }

    public String getOsVersion() {
        return osVersion;
    }

    public String getUserName() {
        return userName;
    }

    public String getAuth() {
        return auth;
    }

}
